package com.interview.checkinfo.entity;

import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;

import com.interview.core.basemodel.BaseModel;
import com.interview.employeeInfo.entity.EmployeeInfo;
@Entity
@Table(name="check_info")
public class CheckInfo extends BaseModel<String> {
	@Id
	@GenericGenerator(name = "idGenerator", strategy = "uuid")
	@GeneratedValue(generator = "idGenerator")
	private String id;
	private String employeeName;
	
	@DateTimeFormat(pattern="MM/dd/yyyy HH:mm")
	private Date createdTime;
	@DateTimeFormat(pattern="MM/dd/yyyy HH:mm")
	private Date chcekInTime;
	@DateTimeFormat(pattern="MM/dd/yyyy HH:mm")
	private Date chcekOutTime;
	
	@ManyToOne(fetch = FetchType.EAGER, optional = false)
	@JoinColumn(name = "employeeInfo_id", referencedColumnName = "id")
	private EmployeeInfo employeeInfo;
	
	public EmployeeInfo getEmployeeInfo() {
		return employeeInfo;
	}

	public void setEmployeeInfo(EmployeeInfo employeeInfo) {
		this.employeeInfo = employeeInfo;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Date getCreatedTime() {
		return createdTime;
	}

	public void setCreatedTime(Date createdTime) {
		this.createdTime = createdTime;
	}

	public Date getChcekInTime() {
		return chcekInTime;
	}

	public void setChcekInTime(Date chcekInTime) {
		this.chcekInTime = chcekInTime;
	}

	public Date getChcekOutTime() {
		return chcekOutTime;
	}

	public void setChcekOutTime(Date chcekOutTime) {
		this.chcekOutTime = chcekOutTime;
	}

	public String getEmployeeName() {
		return employeeName;
	}

	public void setEmployeeName(String employeeName) {
		this.employeeName = employeeName;
	}

	
}
